home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_02 / smith / code13_2.c < prev    next >
Text File  |  1993-12-14  |  422b  |  17 lines

  1. #define BASE  91          /* # possible output chars */
  2. #define FIRST_CODE  '!'   /* lowest output character */
  3. #define MAKE_PRINT(c)  ((c)+FIRST_CODE) 
  4.  
  5. put_2_ASCII (n)
  6. unsigned int n;
  7. {
  8. /* put_2_ASCII() converts the 13-bit argument to two
  9. ** characters and writes them to the output file.
  10. */
  11.     unsigned int rem;
  12.     rem = n % BASE;
  13.     n = n / BASE;
  14.     putc (MAKE_PRINT(n), outf);
  15.     putc (MAKE_PRINT(rem), outf);
  16. }
  17.